import type { RouteMeta } from 'vue-router'
import { TreeNode } from '@/types/global'

export interface UserInfo {
  id: number
  username: string
  nickname?: string
  gender: 0 | 1
  phone?: string
  email?: string
  avatar?: string
  roles: string[]
  authorities: string[]
  nonLocked?: boolean
  enabled?: boolean
}

export interface UserDto {
  id?: number
  username?: string
  nickname?: string
  password?: string
  gender?: 0 | 1
  phone?: string
  email?: string
  avatar?: string
  rolesId: number[]
  deptsId: number[]
  nonLocked?: boolean
  enabled: boolean
}

export interface UserVo {
  id?: number
  username?: string
  nickname?: string
  gender?: 0 | 1
  phone?: string
  email?: string
  avatar?: string
  roles: RoleVo[]
  depts: DeptVo[]
  nonLocked?: boolean
  enabled: boolean
}

export interface UserParam {
  username?: string
  nickname?: string
  gender?: 0 | 1
  phone?: string
}

export interface RoleDto {
  id?: number
  name?: string
  code?: string
}

export interface RoleVo {
  id: number
  name: string
  code: string
  createTime: number
  updateTime: number
}

export interface Menu {
  id: number
  path: string
  name: string
  component?: string
  meta?: RouteMeta
  redirect?: string
  children?: Menu[]
}

export interface AuthorityDto {
  id?: number
  title?: string
  name?: string
  type?: number
  path?: string
  component?: string
  redirect?: string
  parentId?: number
  order?: number
  icon?: string
  cache?: boolean
  affix?: boolean
  hidden?: boolean
}

export interface AuthorityVo extends TreeNode {
  title?: string
  name?: string
  type?: number
  path?: string
  component?: string
  redirect?: string
  meta: RouteMeta
}

export interface TenantDto {
  id?: number
  tenantId?: string
  name?: string
  logo?: string
  enabled?: boolean
  startTime?: string
  endTime?: string
}

export interface TenantVo {
  id?: number
  tenantId?: string
  name?: string
  logo?: string
  enabled?: boolean
  startTime?: string
  endTime?: string
}

export interface TenantParam {
  tenantId?: string
  name?: string
  enabled?: string
  startTime?: string
  endTime?: string
}

export interface DeptDto {
  id?: number
  name?: string
  code?: string
  order?: number
  parentId?: number
}

export interface DeptVo {
  id: number
  name: string
  code?: string
  order?: number
  parentId?: number
  children?: DeptVo[]
  createTime?: number
  updateTime?: number
}

export interface DictDto {
  id: number
  name: string
  code: string
}

export interface DictVo {
  id: number
  name: string
  code: string
  createTime: string
  updateTime: string
}

export interface DictParam {
  name: string
  code: string
}

export interface DictItemVo {
  id: number
  dictId: number
  name: string
  value: string
}

export default class type {
}
